package http;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class HttpSession {
    String id = UUID.randomUUID().toString()
            .toUpperCase().replaceAll("-","");

    public String getId(){
        return id;
    }

    //设置sessio参数
    public Map<String, Object> map = new HashMap<>();

    public void setAttribute(String key, Object value){
         map.put(key,value);
    }

    public Object getAttribute(String key){
        return  map.get(key);
    }

}
